<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  String path = request.getContextPath();
%>
<head>
  <script src="../assets/js/echarts.min.js"></script>
  <script src="../assets/js/jquery.min.js"></script>
  <script src="../assets/js/theme.js"></script>
  <script src="../assets/js/amazeui.min.js"></script>
  <script src="../assets/js/amazeui.datatables.min.js"></script>
  <script src="../assets/js/dataTables.responsive.min.js"></script>
  <%--    <script src="../assets/js/app.js"></script>--%>
</head>

<div class="container-fluid am-cf">
  <div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-9">
      <div class="page-header-heading"><span class="am-icon-home page-header-heading-icon"></span> 添加图书
        <small>图书管理</small></div>
      <p class="page-header-description"></p>
    </div>
  </div>
</div>

<div class="row-content am-cf">

  <div class="row">

    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
      <div class="widget am-cf">
        <div class="widget-head am-cf">
          <div class="widget-title am-fl">图书信息</div>
        </div>
        <div class="widget-body am-fr">

          <form class="am-form tpl-form-border-form" id="fm_addBook">

            <div class="am-form-group">
              <label for="name" class="am-u-sm-12 am-form-label am-text-left">图书名称 <span
                      class="tpl-form-line-small-title">book-name</span></label>
              <div class="am-u-sm-12">
                <input type="text" class="tpl-form-input am-margin-top-xs" id="name" name="name"
                       placeholder="请输入图书名称">
              </div>
            </div>

            <div class="am-form-group">
              <label class="am-u-sm-12 am-form-label am-text-left">图书类型 <span
                      class="tpl-form-line-small-title">book-type</span></label>
              <div class="am-u-sm-12  am-margin-top-xs">
                <select data-am-selected="{searchBox: 1}" style="display: none;" name="typeid">
                  <option value="0">无</option>
                  <option value="1">童书</option>
                  <option value="2">漫画</option>
                </select>
              </div>
            </div>

            <div class="am-form-group">
              <label class="am-u-sm-12 am-form-label  am-text-left">封面图 <span
                      class="tpl-form-line-small-title">Images</span></label>
              <div class="am-u-sm-12 am-margin-top-xs">
                <div class="am-form-group am-form-file">
                  <div class="tpl-form-file-img">
                    <img src="../assets/img/a5.png" alt="">
                  </div>
                  <button type="button" class="am-btn am-btn-danger am-btn-sm ">
                    <i class="am-icon-cloud-upload"></i> 添加封面图片
                  </button>
                  <input id="doc-form-file" type="file" multiple="">
                </div>

              </div>
            </div>

            <div class="am-form-group">
              <label for="stock" class="am-u-sm-12 am-form-label am-text-left">图书库存 <span
                      class="tpl-form-line-small-title">book-stock</span></label>
              <div class="am-u-sm-12">
                <input type="text" class="tpl-form-input am-margin-top-xs" id="stock" name="stock"
                       placeholder="请输入图书库存">
              </div>
            </div>

            <div class="am-form-group">
              <label for="price" class="am-u-sm-12 am-form-label am-text-left">图书价格 <span
                      class="tpl-form-line-small-title">book-price</span></label>
              <div class="am-u-sm-12">
                <input type="text" class="tpl-form-input am-margin-top-xs" id="price" name="price"
                       placeholder="请输入图书价格">
              </div>
            </div>

            <div class="am-form-group">
              <label for="press" class="am-u-sm-12 am-form-label am-text-left">图书出版社 <span
                      class="tpl-form-line-small-title">book-press</span></label>
              <div class="am-u-sm-12">
                <input type="text" class="tpl-form-input am-margin-top-xs" id="press" name="press"
                       placeholder="请输入图书出版社">
              </div>
            </div>

            <div class="am-form-group">
              <label for="author" class="am-u-sm-12 am-form-label am-text-left">图书作者 <span
                      class="tpl-form-line-small-title">book-author</span></label>
              <div class="am-u-sm-12">
                <input type="text" class="tpl-form-input am-margin-top-xs" id="author" name="author"
                       placeholder="请输入图书作者">
              </div>
            </div>

            <div class="am-form-group">
              <label for="address" class="am-u-sm-12 am-form-label am-text-left">图书储存地址 <span
                      class="tpl-form-line-small-title">book-address</span></label>
              <div class="am-u-sm-12">
                <input type="text" class="tpl-form-input am-margin-top-xs" id="address" name="address"
                       placeholder="请输入图书储存地址">
              </div>
            </div>

            <div class="am-form-group">
              <label for="intro" class="am-u-sm-12 am-form-label am-text-left">图书介绍 <span
                      class="tpl-form-line-small-title">book-intro</span></label>
              <div class="am-u-sm-12">
                <input type="text" class="tpl-form-input am-margin-top-xs" id="intro" name="intro"
                       placeholder="请输入图书介绍">
              </div>
            </div>

            <div class="am-form-group">
              <div class="am-u-sm-12 am-u-sm-push-12">
                <button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success "
                        id="bt_addBook">提交
                </button>
              </div>
            </div>

          </form>

        </div>
      </div>
    </div>
  </div>

</div>
<script src="../assets/js/jquery-3.3.1.min.js"></script>
<script>
  $("#bt_addBook").click(function () {
    var inputData = $("#fm_addBook").serialize();
    alert(inputData);
  });
</script>

